package com.xique.park.controller.screen;

import com.xique.common.core.web.domain.AjaxResult;
import com.xique.common.log.annotation.Log;
import com.xique.park.bean.domain.Area;
import com.xique.park.service.service.IAreaService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 地区信息controller
 *
 * @author wld
 * @date 2022/3/14 9:46
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/area")
public class AreaController {

    private final IAreaService areaService;

    @Log(title = "获取停车大屏总数据")
    @GetMapping(value = "/all")
    public AjaxResult info() {
        List<Area> areaList = areaService.all();
        return AjaxResult.success(areaList);
    }

}
